﻿/*******************************************************************************
 * AAEngine
 * Copyright (c) 2010 Mike Jarosch
 *
 * Original source PushButton Engine:
 * Copyright (C) 2009 PushButton Labs, LLC
 * For more information see http://www.pushbuttonengine.com
 *
 * This file is licensed under the terms of the MIT license, which is included
 * in the "MIT License.txt" file at the root directory of this SDK.
 ******************************************************************************/

using Microsoft.Xna.Framework.Graphics;

namespace AAEngine.Engine.Resources
{
    public class ImageResource : Resource
    {
        Texture2D _imageData;

        public override void Initialize(object data)
        {
            base.Initialize(data);

            _imageData = (Texture2D)data;
        }

        public override void Dispose()
        {
            base.Dispose();

            if (_imageData != null)
            {
                _imageData.Dispose();
                _imageData = null;
            }
        }

        public Texture2D ImageData
        {
            get { return _imageData; }
        }
    }
}
